/*
 * Copyright (c) 2018 GAC-RND.
 * All rights reserved.
 */
package com.kll.carolinehmibiz.base.net.exception;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author zlcai
 */
public class ResultCode extends BaseExceptionEngine {

    /**
     * 通用错误码
     */
    public final static int SUCCESS = 200;
    public static final int BASE_NOT_FOUND = 404;
    public static final int BASE_UNKONW = 9000;
    public static final int BASE_PARSE_ERROR = 9001;
    public static final int BASE_NETWORK_ERROR = 9002;
    public static final int BASE_HTTP_ERROR = 9003;
    public static final int BASE_NETWORK_DISCONNECT = 9004;
    public static final int SERVICE_DISCONNECT = 9005;
    public static final int REMOTE_EXCEPTION = 9006;

    public static final Map<Integer, String> GCS_RESULT_MESSAGE = new HashMap();

    static {
        GCS_RESULT_MESSAGE.put(BASE_NOT_FOUND, "404");
        GCS_RESULT_MESSAGE.put(BASE_UNKONW, "未知异常");
        GCS_RESULT_MESSAGE.put(BASE_PARSE_ERROR, "解析错误");
        GCS_RESULT_MESSAGE.put(BASE_NETWORK_ERROR, "网络错误");
        GCS_RESULT_MESSAGE.put(BASE_HTTP_ERROR, "HTTP 错误");
        GCS_RESULT_MESSAGE.put(BASE_NETWORK_DISCONNECT, "网络断开连接");
        GCS_RESULT_MESSAGE.put(SERVICE_DISCONNECT, "服务已断开");
        GCS_RESULT_MESSAGE.put(REMOTE_EXCEPTION, "远端服务连接失败");

    }

}
